package demo.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import demo.dao.ConferenceApplyMapper;
import demo.entity.ConferenceApply;
import demo.service.ConferenceApplyService;
@Service
public class ConferenceApplyServiceImpl implements ConferenceApplyService{

	
	@Resource    
	private ConferenceApplyMapper cam;

	@Override
	public boolean addConferenceApply(ConferenceApply conferenceApply) {
		// TODO Auto-generated method stub
		boolean flag=false;
		if(cam.insertSelective(conferenceApply)>0) {
			flag=true;
		}
		return flag;
	}

	@Override
	public boolean updateConferenceApply(ConferenceApply conferenceApply) {
		// TODO Auto-generated method stub
		boolean flag=false;
		if(cam.updateByPrimaryKeySelective(conferenceApply)>0) {
			flag=true;
		}
		return flag;
	}

	@Override
	public boolean deleteConferenceApply(Integer id) {
		// TODO Auto-generated method stub
		boolean flag=false;
		if(cam.deleteByPrimaryKey(id)>0) {
			flag=true;
		}
		return flag;
	}

	@Override
	public ConferenceApply getById(Integer id) {
		// TODO Auto-generated method stub
		return cam.selectByPrimaryKey(id);
	}

	@Override
	public List<ConferenceApply> getByConferenceApply(ConferenceApply cApply, Integer pageNo, Integer pageSize) {
		// TODO Auto-generated method stub
		return cam.findByConferenceApply(cApply, pageNo, pageSize);
	}
}
